merge sorted array leetcode solution